import request from "@/utils/request";
import type { trademarkResponseData,tradmark } from "@/api/product/trademark/model/trademark";

//获取品牌数据
export const reqTradeMarkList = (page: number, limit: number) =>
  request.get<any,trademarkResponseData>(`/admin/product/baseTrademark/${page}/${limit}`);

//添加新的品牌与修改品牌的数据
export const reqAddOrUpdateTradeMark = (data:tradmark)=>{
  if(data.id){
    console.log(1);
    
    return request.put<any,any>('/admin/product/baseTrademark/update',data)
  }else{
    console.log(2);
    
    return request.post<any,any>('/admin/product/baseTrademark/save',data)
  }
}
//删除的接口
export const reqDeleteTradeMark = (id:number)=>request.delete<any,any>(`/admin/product/baseTrademark/remove/${id}`)